package com.student.liu.controller;


import com.student.liu.service.ISeckillService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 秒杀相关 接口
 */
@Slf4j
@RestController
public class OrderformController extends BaseController {

    @Resource
    ISeckillService seckillService;

    @PostMapping("buy")
    public Object buy() {
        seckillService.buy(1);
        return success("恭喜你，抢到了。订单正在生成中。。。", null);
    }


}
